import { ref } from 'vue'
import { defineStore } from 'pinia'

export const useUser = defineStore(
  'user',

  () => {
    const loginname = ref<string>('')
    const token = ref<string>('')
    const userid = ref<string>('')
    const cartNum=ref(0)

    return { loginname, token, userid ,cartNum}
  },

  {
    persist: true
  }
)
